package synchonized;

public class SynchronizedDemo2 implements Runnable{

    private static int num=0;
    @Override
    public void run() {
        method();
    }

    public static synchronized void method(){
        for (int i=0; i < 10000; i++) {
            num++;
        }
    }
}
